package com.easyj.admin.db.mapper;

import java.util.List;

import com.easyj.admin.db.model.Role;
import com.easyj.admin.db.model.User;
import com.easyj.admin.db.model.UserRole;



public interface UserRoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserRole record);
    
    UserRole selectByPrimaryKey(Long id);
    
    //--------
    List<Role> selectRolesByUserId(Long userId);
    
    int deleteByUserId(Long userId);
    
    long countByRoleId(Long roleId);
    
    List<User> selectUsersByRoleId(Long roleId);
    List<User> selectUsersByRoleCode(String roleCode);
    
}